using System;
using System.Collections.Generic;
using System.Text;
using Mpi.Common.Collections;

namespace Xeml.Document
{
    public class ObservationPointCollection : ObservableIdCollectionBase<ObservationPoint, TimeSpan>
    {
        public StoryBase Story { get; private set; }

        public ObservationPointCollection(StoryBase owner)
        {
            Story = owner;
        }

        protected override TimeSpan GetIdentifiere(ObservationPoint item)
        {
            return item.TimePoint;
        }

        protected override void SetOwner(ObservationPoint item)
        {
            item.Collection = this;
        }

        protected override void RemoveOwner(ObservationPoint item)
        {
            item.Collection = null;
        }
    }
}
